﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AopOfUnityDemo
{
    public class PeopleTalk : ITalk
    {
        private string username;

        private int age;

        public string UserName
        {
            get { return username; }
        }

        public int Age
        {
            get { return age; }
        }

        public PeopleTalk(string userName, int age)
        {
            this.username = userName;
            this.age = age;
        }

        public virtual void talk(string msg)
        {
            Console.WriteLine(msg + "!你好，我是" + username + "，我的年龄" + age);
        }

        public virtual void talk2(string msg2)
        {
            Console.WriteLine(msg2 + "!你好，我是" + username + "，我的年龄" + age);
        }
    }
}
